﻿-- This script shows how to use SplitFieldByDelimiter
-- You need to add three parameters
-- parameter 1st: delimited field name, the field which you want to split
-- parameter 2nd: delimiter character
-- parameter 3rd: maximum splited columns expected , this parameter will be removed in next versions of this function
-- a working sample :

declare @sql varchar(max)
set @sql='select top 1000 '+dbo.SplitFieldByDelimiter('DelimitedText','/',8)
+' from [TmpDataTable]'

exec (@sql)